package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class BabyPhotoUpdateRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/update_babylogo";

    private int id;

    private String ext;

    private String data;

    private long updateTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        BabyPhotoUpdateRequestBody body = new BabyPhotoUpdateRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setId(id);
        body.setExt(ext);
        body.setData(data);
        body.setUpdateTime(updateTime);
        return body;
    }

    private class BabyPhotoUpdateRequestBody extends BaseTokenRequestBody {

        @SerializedName("BabyID")
        private int id;

        @SerializedName("Ext")
        private String ext;

        @SerializedName("ImageData")
        private String data;

        @SerializedName("LastChangeTS")
        private long updateTime;

        private BabyPhotoUpdateRequestBody() {
            setSv(BaseRequestConfig.SV_BABY_PHOTO_UPDATE);
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getExt() {
            return ext;
        }

        public void setExt(String ext) {
            this.ext = ext;
        }

        public String getData() {
            return data;
        }

        public void setData(String data) {
            this.data = data;
        }

        public long getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(long updateTime) {
            this.updateTime = updateTime;
        }
    }

}
